export function toast(text: string) {
    let el = document.createElement('p');
    el.innerText = text;
    el.className = 'toast';
    (document.querySelector('#root') as Element).appendChild(el);
    let inter = setTimeout(() => {
        (el.parentNode as Element).removeChild(el);
        window.clearTimeout(inter);
    }, 3000);
}